﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations.Schema;
namespace MyShopCity.Models
{
    public class Order
    {
        public int ID { get; set; }
        public string OrderNo { get; set; }

        public DateTime OrderDate { get; set; }
        public int OrderStatus { get; set; }
        public int UserID { get; set; }
        public decimal TotalAmount { get; set; }

        public virtual List<OrderSub> OrderSubs { get; set; }
        [ForeignKey("UserID")]
        public virtual User User { get; set; }

        public Order() 
        {
            this.OrderSubs = new List<OrderSub>();
        }
    }
}